﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CRMBiz;

namespace CRMWeb.WebServices
{
    /// <summary>
    /// Summary description for SendEmailToUsers
    /// </summary>
    public class SendEmailToUsers : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            try
            {
                string fromName = context.Request.Params["fromName"];

                string password=context.Request.Params["password"];
                string toName = context.Request.Params["toName"];
                string attachmentFile = context.Request.Params["attachmentFile"];
                string attachmentsDrag = context.Request.Params["attachmentsDrag"];
                string subject = context.Request.Params["subject"];
                string bodyContent = context.Request.Params["bodyContent"];
               context.Response.Write(ClientProfileHandler.SendEmail(fromName,password, toName, attachmentFile, attachmentsDrag, subject, bodyContent));
            }
            catch (Exception)
            {
                throw;
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}